package com.fce.fcesystem.utils;

import org.springframework.util.DigestUtils;

import java.util.UUID;
/**
 * @description:密码md5加密
 * @param: oldPassword
 * @return: newPassword
 **/
public class GetMD5Pwd {
    public static String getMd5Password(String oldPassword, String salt) {
        String newPassword = "";
        for (int i = 0; i < 3; i++) {
            newPassword = DigestUtils.md5DigestAsHex((salt + oldPassword + salt).getBytes()).toUpperCase();
        }
        return newPassword;
    }
}
